import 'package:flutter/material.dart';
import 'package:robot3/widgets.dart';

/// showMenu的使用
void main() {
  // final themeData = ThemeData(
  //   popupMenuTheme: PopupMenuThemeData(
  //     menuPadding: EdgeInsets.zero,
  //     color: Colors.tealAccent,
  //     // 菜单背景颜色
  //     shape: RoundedRectangleBorder(
  //       borderRadius: BorderRadius.circular(0), // 菜单圆角
  //     ),
  //     elevation: 0,
  //     // 菜单阴影
  //     textStyle: TextStyle(
  //       fontSize: 4,
  //       color: Colors.yellow, // 菜单文字样式
  //     ),
  //   ),
  // );

  runApp(MaterialApp(home: const SecondScreen()));
}

class SecondScreen extends StatelessWidget {
  const SecondScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      // appBar: AppBar(
      //   title: Text('Second Screen'),
      // ),
      body: Column(
        children: [
          SizedBox(height: 50),
          Row(
            children: [
              RobotButton(onClick: (text) {}),
              SizedBox(width: 200),
              _Test01(),
            ],
          ),
        ],
      ),
    );
  }
}

class _Test01 extends StatelessWidget {
  const _Test01({super.key});

  @override
  Widget build(BuildContext context) {
    return
      SizedBox(width: 100,height: 100,child:
      InkWell(
      onTap: () {
        print("InkWell tapped!");
      },
        // child: RobotText(text:"122"),
      child: Container(
        color: Colors.teal.withAlpha(100),
      ),
        // padding: const EdgeInsets.all(20),
        // decoration: BoxDecoration(
        //   color: Colors.blue,
        //   borderRadius: BorderRadius.circular(10),
        // ),
        // child: const Text(
        //   'Tap Me',
        //   style: TextStyle(color: Colors.white, fontSize: 18),
        // ),
      )
      );
      // ));
  }
}
